<?php

namespace App\Model\Auth;


use App\Model\Model;
use function Hyperf\Config\config;

/**
 * 菜单表
 */
class Menu extends Model
{
    protected ?string $table = 'auth_menu';
    // 允许批量赋值的字段
    protected array $fillable = [
        'parent_id',
        'name',
        'path',
        'component',
        'icon',
        'redirect',
        'sort',
        'type',
        'permission',
        'status',
        'show_type',
        'query'
    ];

    // 字段类型转换
    protected array $casts = [
        'id' => 'integer',
        'parent_id' => 'integer',
        'sort' => 'integer',
        'type' => 'integer',
        'status' => 'integer',
        'show_type'=>'integer',
        'created_at' => 'datetime',
        'updated_at' => 'datetime',
    ];





}
